package com.me.pojo;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MailInfo {

    /**
     * 邮箱id
     */
    private Long id;

    /**
     * 邮箱标题
     */
    private String subject;

    /**
     * 邮箱内容
     */
    private String text;

    /**
     * 接受者的邮箱
     */
    private String toEmail;

    /**
     * 发送者的邮箱
     */
    private String fromEmail;

    /**
     * 发送时间
     */
    private Date sendDate;

    /**
     * 是否有附件
     */
    private int fileFlag = 0;

    public MailInfo() {
    }

    public MailInfo(String subect, String text, String to, String from) {
        this.subject = subect;
        this.text = text;
        this.toEmail = to;
        this.fromEmail = from;
        this.sendDate = new Date();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getTo() {
        return toEmail;
    }

    public void setTo(String to) {
        this.toEmail = to;
    }

    public String getFrom() {
        return fromEmail;
    }

    public void setFrom(String from) {
        this.fromEmail = from;
    }

    public Date getSendDate() {
        return sendDate;
    }

    public void setSendDate(Date sendDate) {
        this.sendDate = sendDate;
    }

    public int isFileFlag() {
        return fileFlag;
    }

    public void setFileFlag(int fileFlag) {
        this.fileFlag = fileFlag;
    }

    @Override
    public String toString() {
        return "MailInfo{" +
                "id=" + id +
                ", subject='" + subject + '\'' +
                ", text='" + text + '\'' +
                ", toEmail='" + toEmail + '\'' +
                ", fromEmail='" + fromEmail + '\'' +
                ", sendDate=" + sendDate +
                ", fileFlag=" + fileFlag +
                '}';
    }
}
